<!DOCTYPE html>
<html style="font-size: 23.4375px;">
<head>
    <include file="./public/header.html"/>
    <style>
        a{
            margin: 0 auto;
        }
        #tuiguang{
            display:block;
            text-align: center;
            width: 300px;
            height: 40px;
            line-height:40px;
            background: orange;
            color: white;
            border-radius: 2px;
            box-shadow: 0 5px 0 0 lightgrey;
        }
        .disable {
            background: #d6d6d6 !important;
            color: #999 !important;
        }
    </style>
</head>
<body style="font-size: 21.7589px;">
<div id="app">
    <div id="shadow" style="display: none;"></div>
    <header class="top"><span style="display: none;">加载中...</span> <span>晋级奖励</span> <!---->
        <div class="iconfont back" style="display: none;"></div>
        <a href="{:U('Index/activity')}" class="iconfont back"></a>
    </header>

    <div data-v-3cbfc35c="" class="activityMian main" s="[object Object]">
        <input type="hidden" id="uid" value="{$id}">
        <div data-v-3cbfc35c="" class="activiTop"><img data-v-3cbfc35c="" alt="" width="100%" src="/style/images/sjtuiguang.png">

            <div data-v-128082f2="" class="rewardStatus">
                <em data-v-128082f2="" class="e1">可领取金额：
                    <i data-v-128082f2="">
                        <input type="text" value="<?php if($tuiguang['level']==''){echo '未登录';}else{echo sprintf('%.2f', $ling);};?>" class="tuiguang" style="border: hidden;color: orangered;width: 60px" readonly>
                    </i>
                </em>
            </div>
            <div id="cen">
                <a data-v-5be8b080="" href="javascript:;" id="tuiguang" class="<?php if($tuiguang['is_lingqu']!='0'){echo 'disable';} ?> dianji00">
                    领取
                </a>
            </div>
        </div>
        <h3 data-v-3cbfc35c="">奖金比例</h3>
        <table data-v-3cbfc35c="">
            <tbody><tr data-v-3cbfc35c="">
                <th data-v-3cbfc35c="">金额</th>
                <th data-v-3cbfc35c="">奖金</th>
            </tr>
            <tr data-v-3cbfc35c="">
                <td data-v-3cbfc35c="">500 元</td>
                <td data-v-3cbfc35c="">18 元</td>

            </tr>
            <tr data-v-3cbfc35c="">
                <td data-v-3cbfc35c="">5000 元</td>
                <td data-v-3cbfc35c="">58 元</td>
            </tr>

            </tbody></table>
        <h3 data-v-3cbfc35c="">活动说明</h3>

        <div data-v-3cbfc35c="" class="wrapExplain"> <p>
            1、只要成功邀请好友注册且累计充值满500即可领取18元；
        </p>

            <p>
                2、累计充值满5千即可领取58元；
            </p>
        </div>
    </div>
    <!--弹框 begian-->
    <div id="dengji" class="layermbox layermbox0 layermshow" index="10" style="display: none">
        <div class="laymshade"></div>
        <div class="layermmain">
            <div class="section">
                <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                    <button class="layermend"></button>
                    <div class="layermcont">-请登录-</div>
                    <div class="layermbtn"><span type="1">确定</span></div>
                </div>
            </div>
        </div>
    </div>
    <!--弹框 begian-->
    <div id="ssc3" class="layermbox layermbox0 layermshow" index="10"  style="display: none">
        <div class="laymshade"></div>
        <div class="layermmain">
            <div class="section">
                <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                    <button class="layermend"></button>
                    <div class="layermcont">
                        <p>1.该奖金已经领取</p>
                        <p>2.好友注册且累计充值未达到要求</p>
                    </div>
                    <div class="layermbtn"><span type="1">确定</span></div>
                </div>
            </div>
        </div>
    </div>
    <!--弹框 end-->
    <!--弹框 begian-->
    <div id="lingqu41" class="layermbox layermbox0 layermshow" index="10" style="display: none">
        <div class="laymshade"></div>
        <div class="layermmain">
            <div class="section">
                <div class="layermchild layerConfirm layermanim"><h3 style="">温馨提示</h3>
                    <button class="layermend"></button>
                    <div class="layermcont">领取成功
                        <p>
                            金额为：<input type="text"  class="kkk" style="border: hidden;color: orangered;width: 60px" readonly>
                        </p>

                    </div>
                    <div class="layermbtn"><span type="1">确定</span></div>
                </div>
            </div>
        </div>
    </div>
    <!--弹框 end-->
</div>
</body>
</html>
<script>
    $(".layermbtn").click(function(){
        $(".layermbox").hide();
    });
    //推广好礼
    var tuiguang = $(".tuiguang").val();
    if(tuiguang==0.00){
        $(".dianji00").addClass("disable");
    }

    $(".dianji00").click(function () {
        var uid = $("#uid").val();
        if(uid==''){
            $("#dengji").show();
            return false;
        }
        var tuiguang = $(".tuiguang").val();
        var type = 7;

        if($("#tuiguang").hasClass("disable")){
            $("#ssc3").show();
            return false;
        }else {
            $.ajax({
                type: "POST",
                url: "{:U('Index/tuiguang')}",
                data: {'tuiguang': tuiguang, 'type': type},
                success: function (dat) {
                    if(dat==13){
                        $("#ssc3").show();
                        $(".dianji00").addClass("disable");
                        return false;
                    }
                    var dat1 = dat;

                    var aaa1 = parseInt(dat1.substring(0,1));
                    var bbb1 = dat1.substr(1) ;
                    $(".kkk").val(bbb1);
                    if (aaa1 == 1) {
                        $(".dianji00").addClass("disable");
                        $("#lingqu41").show();
                    }
                }
            });
        }

    });
</script>